-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select windows by index #1152
Select windows by index #1152
Conversation
538457e
to
1295a5f
Compare
Cool! The java Windows class already has a I'd prefer if it was named |
Oh you're right, I was not aware. I'll replace the ad-hoc code with a call to |
1295a5f
to
4e65545
Compare
4e65545
to
c3df8eb
Compare
Actually, I like |
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/json/ConstraintParsers.java
Outdated
Show resolved
Hide resolved
c3df8eb
to
db942de
Compare
db942de
to
d45b73f
Compare
d45b73f
to
eb17309
Compare
Description
This allows to select windows by their index in the sequence.
Example:
Real.Resource("state of charge").lessThan(0.3).starts().keepTrueSegment(2)
will select the second window ofReal.Resource("state of charge").lessThan(0.3).starts()
. If it does not exist, it will return nothing.If the user provides a negative index, the index starts from the last element (-1).
Verification
Some new tests.
Documentation
Has to be added to constraints documentation.
Future work
I want to add
before(Windows)
andafter(Windows)
operators to support more sequence operations.